home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 551-575 / disk_554 / ifsgen / ifsgen.doc < prev    next >
Text File  |  1992-05-06  |  38KB  |  827 lines

  1.  
  2.                         IFSGEN v1.0 (c) January 1991
  3.                  
  4.                    Written with AMOS (c) 1990 Mandarin/Jawx
  5.  
  6.                            By Andrew Kreibich
  7.  
  8.    SEE END OF FILE FOR ADDITIONAL DOCS/CHANGES FOR LATER VERSIONS
  9.  
  10.    This file refers to IFSgen and IFSgenDEM. The DEM version is identical
  11.    to the real thing except that all saves have been disabled. You can
  12.    save yourself a lot of time (and your pictures) by registering. See
  13.    DISTRIBUTION, below.
  14.  
  15.  
  16.    Note: To toggle Wbench screen use left-Amiga-A (Alt-N and M will not work)
  17.          To quit without using the quit menu press Ctrl-C.
  18.  
  19.  
  20.  
  21.    #########################
  22.       MEMORY REQUIREMENTS
  23.    #########################
  24.    My machine is an A500 with 1 meg of ram. I forked out a lot of hard earned
  25.    cash for the extra half meg and I intend getting some use out of it!
  26.    Therefore when I write programmes I usually use up plenty of memory in 
  27.    order to get more speed where possible. I have not tried this programme
  28.    on a 512k machine, so I don't know if it would run. It will almost
  29.    certainly not run on a 512k machine if workbench is loaded and may still
  30.    cause some problems when you have generated a lot of triangles or when 
  31.    the programme tries to open the palette tool. 
  32.  
  33.    ################
  34.      DISTRIBUTION
  35.    ################
  36.  
  37.    THIS PROGRAMME IS SHAREWARE!
  38.  
  39.    This means that my wallet would appreciate a little feedback for all my
  40.    efforts!
  41.    You may distribute the DEM version of this software to anyone providing you 
  42.    observe the following conditions.
  43.    YOU MAY NOT DISTRIBUTE THE FULL VERSION OF IFSgen TO ANYONE ELSE WHO HAS 
  44.    NOT REGISTERED WITH ME. (give them the DEM version instead!)
  45.  
  46.    (a) You don't make any money from it (apart from a nominal copying fee)
  47.        without my prior written permission.
  48.  
  49.    (b) You may not include any part of it in any commercial release  
  50.        (including SHAREWARE or one of its variations) without my prior
  51.        written permission. 
  52.  
  53.    (c) You give me credit for any of my routines in your doc. files 
  54.        and/or the programme you use them in. (FEED MY EGO!)
  55.  
  56.    (d) You distribute this entire doc. file with the programme and 
  57.        also the .IFS and .IFF files in the drawer.
  58.  
  59.    (e) You write back and let me know what you think of it along with a 
  60.        SHAREWARE donation (min $20 Australian)
  61.  
  62.             To  Andrew Kreibich
  63.                 Box 333
  64.                 Wantirna South
  65.                 Victoria
  66.                 Australia.  3152
  67.  
  68.    If you register and send $20 (Australian dollars please, our banks charge
  69.    a fortune to convert), I will try and make any changes you
  70.    suggest and I will send you the latest upgrade (with all features
  71.    enabled), the AMOS source and some other AMOS routines and games I am
  72.    working on.
  73.    AMOS programmers can also get a copy of the palette procedure which this
  74.    programme uses. This can be inserted into your own programmes with minimum
  75.    of fuss. Let me know if you want it. FREE to anyone who registers! 
  76.  
  77.    Naturally if you think I have done a really fantastic job on this 
  78.    and you cannot help but show your appreciation by sending more 
  79.    than $20 (Australian Dollars!) etc. then I will happily
  80.    accept it! 
  81.  
  82.    If you have the full version and you have registered: Thanks!
  83.  
  84.    If you have the full version and you have not registered: Then someone
  85.    gave it to you illegally! Please register and do something anatomically
  86.    unpleasant to the pirate who gave (sold?) it to you!
  87.  
  88.      
  89.    WHAT IS IFSGEN?
  90.    ***************
  91.  
  92.    Ifsgen is a programme to generate and display iterated function systems.
  93.    (IFS's). These are a type of fractal which exploit the self-similar
  94.    nature of some shapes to produce a code (the IFS code) which can be used
  95.    to regenerate the image. One advantage of this is that a typical IFS code
  96.    is about 1/500th the size of the original image's code.
  97.  
  98.    An example of a self-similar shape is a fern frond. Each 'branch' of the
  99.    frond is a smaller copy of the entire frond.
  100.  
  101.    What is an IFS code? 
  102.    *********************
  103.    (You can skip this bit if you wish)
  104.    The ifs code is a set of numbers which describes how each part of the
  105.    fern (or any other image) can be derived from the main shape. It does
  106.    this by defining a matrix which describes the mathematical transformation
  107.    for getting from the main image to the smaller image.
  108.    See the Fern example in the programme for this.
  109.  
  110.    In order for the programme to calculate the matrix you must specify 
  111.    3 points on the main image and the corresponding 3 points on each of
  112.    the 'parts' or transformations. When the programme knows the coordinates
  113.    of each of these points it can work out the IFS code.
  114.    I have labelled the main image A and subsequent transformations B,C,D
  115.    etc. The three points on each image are labelled A1,A2,A3. It is 
  116.    important to make sure that the points B1,B2,B3 correspond to these
  117.    same points on the original image.
  118.  
  119.    The IFS code is a set of 6 numbers for each transformation which I
  120.    have labelled A,B,C,D,E and F. These ARE NOT THE SAME as the A,B,C etc
  121.    which I labelled the points with. Sorry if this is a bit confusing
  122.    but you don't need to worry about the actual IFS code to use the
  123.    programme.
  124.      
  125.    To plot the picture the programme picks a point on the screen and then
  126.    chooses one of the transformations at random and applies this to the
  127.    point which is then plotted. The new point is then subjected to the same
  128.    procedure, and this process continues until the user selects stop.
  129.  
  130.    Mathematically 
  131.    
  132.    Xn = A*X + B*Y + E
  133.    Yn = C*X + D+Y + F
  134.    
  135.    Where Xn = new point's X coordinate
  136.          Yn = new point's Y coordinate
  137.           X = last point's X coordinate
  138.           Y = last point's Y coordinate
  139.    A,B,C,D,E and F are the IFS code for the randomly selected transformation.
  140.     
  141.    This method of generating the image is sometimes known as The Chaos Game.
  142.  
  143.    For further information consult any good book on Fractals.
  144.      
  145.    The two that I used were
  146.    "Fractals Everywhere" By Michael Barnsley (Academic Press)
  147.    and     
  148.    "The Science of Fractal Images" Edited by H.O.Peitgen and D.Saupe
  149.    (Springer-Verlag)
  150.  
  151.    INSTRUCTIONS and EXPLANATION OF MENU ITEMS:
  152.    ****************************************** 
  153.  
  154.    GETTING STARTED. (A quick tutorial)
  155.    When you first start IFSGEN you will probably be presented with a
  156.    blank screen (unless I have got around to making a fancy title screen
  157.    or something like that!). 
  158.    I did, so you can ignore the last sentence. Incidentally all of the 
  159.    pictures on this screen were generated with this programme. You should
  160.    find their associated IFS files with this programme.
  161.  
  162.    There are 4 menus which you can use.
  163.  
  164.    You can start a picture in one of 3 ways.
  165.    1. Load IFS from the PROJECT menu.
  166.    2. Add Triangle from the TRANSFORMATION menu
  167.    3. Select one of the 4 examples from the EXAMPLE menu.
  168.     
  169.    First time users will probably find it easiest to select one of the
  170.    examples. Spiral is the simplest one.
  171.    When you have selected this you will see three triangles drawn on the 
  172.    screen. The corners of these triangles are labelled A1,A2,A3 (main
  173.    triangle) and B1,B2,B3 and C1,C2,C3 (The two smaller triangles which
  174.    are used to generate the transformations from the main one). Some of
  175.    these will be difficult to see because they are obscured by some of 
  176.    the others.
  177.    Next select GENERATE from the PICTURE menu.
  178.    The screen will clear and you will slowly see the spiral generated in
  179.    two colours (Green and Blue unless you have already discovered the 
  180.    Palette!). This will take a few minutes to generate.
  181.    Notice that the small green part of the image is really a copy of the
  182.    whole image. (In other words it is self-similar, and the green spiral 
  183.    is known as an affine transformation of the whole image). Similarly,
  184.    the blue section is also a copy of the whole image.
  185.  
  186.    When the image has 'developed' to your satisfaction select stop from
  187.    the PICTURE menu, and then select Show Triangles from the TRANSFORMATION
  188.    menu. This will draw the three triangles on top of your image, so you 
  189.    can see how the picture is constructed from these.
  190.    Now select 'Change Triang B' from the TRANSFORMATION menu and
  191.    you will see triangle B drawn in a different colour and a line leading
  192.    to the mouse. You now have to redraw the triangle using the mouse.
  193.    Place point 1 first. This time put it in the same place as it originally
  194.    was (On the left corner of the big triangle A) by clicking the left mouse
  195.    button over this point. Next place corner B2 (put it over the original 
  196.    B2 this time) and finally place corner B3, put it fairly near the 
  197.    original B3 but not in quite the same spot.
  198.    Now select GENERATE again and see how the shape has changed.
  199.  
  200.    NOTE: The shape is VERY SENSITIVE to small changes in the positions
  201.    of the triangles.
  202.  
  203.    You may also like to look at the other examples.
  204.  
  205.    SIERPINSKI constructs a Sierpinski triangle. This one is fairly easy
  206.    to understand. Each of the three small triangles is a smaller copy of the
  207.    big one and each small one contains three smaller ones and so on.
  208.  
  209.    FERN draws a fern (surprise surprise!)
  210.    This consists of the main triangle and FOUR transformations. The fourth
  211.    (Triangle E) is a bit hard to see. It is a very thin copy of the fern
  212.    and is used to generate the stem. You will see the stem in red when
  213.    you generate it. If you wish to change some of the points on this do it
  214.    carefully. In particular it is very important to keep the small triangles
  215.    in the right place with respect to the others. I.E. if A2 and B2 are
  216.    not in the same place you will get a very strange fern!
  217.    So if you move A2 make sure that you move B2 to the same place!
  218.    The same goes for the following points.
  219.    A1 and E1
  220.    A3 and C2
  221.    B1 and E2
  222.    Also if E3 is not on a straight line between E1 and E2 you will end up 
  223.    with very fat stems!
  224.    (You will not do any harm if you don't follow these rules but you will
  225.    probably end up with something that looks nothing like a fern!)
  226.    SMALL variations to these triangles can produce a variety of ferns and
  227.    trees. To make a tree just move C3 close to the line between C1 and C2, 
  228.    and move D3 close to the line between D1 and D3. You could also try 
  229.    moving A3 and C2  and D3 to the left.
  230.  
  231.    IFS! generates the letters IFS! Each letter is made up of smaller
  232.    copies of IFS! and each small copy is made up of even smaller copies.
  233.    When you get good at manipulating these you might like to try a few 
  234.    words of your own.
  235.  
  236.    Also LOAD some of the IFS files which I have provided and see how these
  237.    are generated.
  238.  
  239.    In particular you could look at some of the galaxy ifs's which are in 
  240.    the drawer. These are all variations of the initial spiral shape with
  241.    a few extra triangles added to make the other 3 spiral arms. Making small
  242.    changes to triangle G will greatly change the spacing of the arms and the
  243.    overall density of the galaxy. You can also change the density of the 
  244.    pictures by stopping the generation earlier or later. 
  245.    Look at the IFF picture 'Galaxies' This was made by combining various 
  246.    galaxy ifs's on the same picture. To do this you should use load iff to
  247.    load a picture, then add your IFS and use Continue (not Generate) when you
  248.    think you have the triangles in the right position. Keep adding other IFS
  249.    codes and use the continue option to draw them on your picture. Finally 
  250.    save the picture with save iff. If you haven't guessed it already, this 
  251.    is how the title screen was generated.
  252.    
  253.    By the way if you want your galaxies to look like galaxies instead of
  254.    multicoloured blobs, then you will have to change the palette to various
  255.    shades of white and grey. If you want to see the colours I used then load
  256.    one of the IFF pictures and then call up the palette tool.
  257.    In this version the IFS file does not save colour information but IFF files 
  258.    do.
  259.  
  260.    If you think you are getting the hang of things try the other menu items
  261.    or find a picture which displays self-similarity and try to generate it!
  262.    (this can be quite hard at first so start with something simple)
  263.    Alternatively just put a few triangles on the screen and see what happens!
  264.  
  265.  
  266.    EXPLANATION OF MENU ITEMS
  267.    *************************
  268.  
  269.    PROJECT MENU:
  270.       ABOUT: Try it and see!
  271.       NEW: clears everything!
  272.       LOAD IFS and SAVE IFS: Load and save the IFS code for the images but
  273.       not the actual pictures. (Use LOAD IFF and SAVE IFF in the PICTURE
  274.       menu for this.) SAVE IS DISABLED IN THE DEM VERSION
  275.       INSTRUCTIONS: Try it!
  276.       QUIT: Do I really need to say it?
  277.  
  278.    TRANSFORMATION MENU:
  279.    This allows you to define and manipulate the various transformations 
  280.    (triangles) which make up the image. You will need to select Generate
  281.    to see the effect of any changes on your image.
  282.  
  283.       ADD TRIANG: This adds another triangle to the image. You should also 
  284.       use this to start an image definition from scratch.
  285.       Clicking this will result in a line being drawn from the current 
  286.       mouse position to somewhere else on the screen (it doesn't matter
  287.       where the other end is, as it is the position of the mouse which 
  288.       is important). If this is the first triangle (Triangle A) then
  289.       the first point wil be A1. Move the mouse to the position you want
  290.       A1 and click the left mouse button. Next place A2 and A3.
  291.  
  292.       You should then add at least 2 more triangles. You cannot GENERATE
  293.       an image until you have at least 3 triangles (including A) defined.
  294.  
  295.       If you make any of the others larger than A the image will probably be
  296.       much larger than the screen.
  297.       (This isn't a fatal problem but you should remember that triangle A is
  298.       used to define the position of the whole shape, while the others are
  299.       used to define the position of SMALLER parts of the shape, so if you
  300.       are trying to produce something in particular keep this in mind. If
  301.       not then feel free to experiment!)
  302.        
  303.       You can have a maximum of 26 triangles because I ran out of letters
  304.       in the alphabet, maybe next time I should programme in Chinese? Apart
  305.       from this there is no reason why this could not be increased.
  306.  
  307.  
  308.       CHANGE TRIANGLE: allows you to reposition a triangle. Unfortunately
  309.       you must place all three corners, although the original position is
  310.       displayed until you have finished so that you can see where it was!
  311.       Maybe in version 2 I will fix this so that you can just reposition
  312.       one corner? (If you want this then write and let me know!)
  313.         
  314.       DELETE TRIANGLE: Fairly obvious!
  315.       But there are two things which you should be aware of.
  316.       1. All other triangles will be relabelled so that you still
  317.          have a complete alphabetical sequence. I.E. if you delete B
  318.          then C will become B, D will become C etc.
  319.       2. You cannot delete triangle A. All others use this as a reference.
  320.          If this did not exist the programme could not calculate the IFS
  321.          code.
  322.  
  323.       Sorry, 3 things!
  324.  
  325.       3. At this stage there is no check to ask if you are sure. Maybe 
  326.          Version 2?
  327.  
  328.       MOVE: this is to allow you to resize and reposition the image on 
  329.             the screen. This is done by manipulating the IFS code, not the
  330.             image, so you will have to Generate again after selecting this.
  331.  
  332.         ZOOM IN: allows you to define a rectangular box with the mouse
  333.                  Click left mouse button on where you want the top left
  334.                  corner of the box and drag it to the place you want the 
  335.                  bottom right corner. Let go and the area inside the box 
  336.                  will be enlarged to fill the screen.
  337.        ZOOM OUT: works in a similar way to zoom in but this time the
  338.                  area displayed on the screen will be shrunk to fit inside
  339.                  the box. This will allow you to see any areas of image
  340.                  which have gone off the screen.
  341.               
  342.            NOTE: The zoom functions were intended to allow fairly small
  343.                  resizing of the image. Excessive use of these will result
  344.                  in large rounding off errors. You should be able to ZOOM 
  345.                  IN by a factor of about 1000 and ZOOM OUT by a factor of
  346.                  about 1,000,000 without any trouble. If you go too far your
  347.                  picture will not be very accurate but the programme should
  348.                  still run.
  349.  
  350.          CENTRE: This allows you to recentre the picture. Place the 
  351.                  crosshair where you want the new centre to be. The 
  352.                  triangles will be moved so that this point will now
  353.                  be at the centre of the screen
  354.  
  355.   ROT 90, 180, 270: Rotate the image 90, 180 and 270 degrees
  356.                     respectively in an anticlockwise direction.
  357.  
  358.          FLIP X:  Flips the picture from left to right.
  359.          FLIP Y:  Flips the picture from top to bottom.
  360.  
  361.        FINE TUNE: Allows you to display and change the position and/or
  362.                   the IFS code of any point or triangle respectively.
  363.                   (see "What is an IFS code?" above.) This brings up a
  364.                   window with the letters A to Z at the top. These are
  365.                   for the triangles which you have defined. Any triangle
  366.                   which has not been defined SHOULD be displayed in a 
  367.                   different colour and cannot be selected. Select the 
  368.                   triangle you wish to fine tune (or just view) by clicking
  369.                   on its letter with the mouse. This will display the
  370.                   coordinates of the corner points of your triangle
  371.                   together with the associated IFS code. Click the mouse 
  372.                   on any box you wish to change and retype it. Press return
  373.                   when done. (There are a couple of 'slightly undesirable
  374.                   features' in this which might appear from time to time,
  375.                   just make sure that the number in the box is right before
  376.                   you quit. These will take any number between 1E-14 and 
  377.                   1E+15 (I hope!), but be aware that if you position one of
  378.                   your points at a screen coordinate of 1E+15 you will find
  379.                   that the programme takes a very long time to draw the
  380.                   triangles!
  381.                   To change another triangle just click on the letter.
  382.                   When you have done select quit.
  383.            NOTES: You cannot change the IFS code for triangle A (this will
  384.                   always be displayed as zero).
  385.                   There is no way of getting your original settings back
  386.                   after you have pressed return, unless you have written
  387.                   them down somewhere or you have used the SAVE IFS option
  388.                   in the PROJECT menu. Something else for Vers. 2?
  389.  
  390.  HIDE/SHOW triangles: Fairly self explanatory!
  391.  
  392.  PICTURE MENU:
  393.       GENERATE: This clears the screen and starts the picture generating.
  394.                 This will also disable the TRANSFORMATION and EXAMPLE
  395.                 menus together with the New, load ifs and save ifs from
  396.                 the project menu. You cannot generate until you have
  397.                 defined at least three triangles.
  398.           STOP: Stops the picture from generating and allows you to use 
  399.                 all of the other menus.
  400.       CONTINUE: This does exactly the same as Generate except that the
  401.                 screen is not cleared first. This can be used to either
  402.                 continue generating a picture after it has been stopped
  403.                 or for generating an image on top of another image or
  404.                 an iff screen which you have loaded.
  405.        PALETTE: This brings up a palette requester which I wrote called
  406.                 Gumbypal. This is an AMOS procedure which you can inlcude
  407.                 in your own AMOS programmes.
  408.     This procedure currently  supports the following features.
  409.  
  410.      DRAGBAR:
  411.      This is the message (Gumby's Palette) at the top of the screen. 
  412.      Hold left mouse button down while you are over this and drag the
  413.      palette screen up and down your screen.
  414.  
  415.      ABOUT:
  416.      Work this out for yourself!
  417.  
  418.      RGB sliders: These work in the usual way, just click on the slider
  419.      with the left mouse button and drag it along, or just click on the
  420.      spot you want it to go to.
  421.  
  422.      Up to 32 colours are displayed in little boxes on the right of the    
  423.      screen. You can select two of these at any time. 
  424.  
  425.      Left mouse button selects the CURRENT colour. This will be changed
  426.      by moving the slider bars.
  427.  
  428.      Right mouse button selects the TO colour. This is used by COPY,
  429.      SPREAD and CYCLE, to copy, spread or cycle from the current colour    
  430.      to the TO colour, and also by SWAP to swap the current colour with   
  431.      the TO colour.
  432.  
  433.      The TO and CURRENT colours are outlined in different colours so that
  434.      you can see them. It is possible that the colours used by these 
  435.      outlines are hard to see because they are the same or similar
  436.      to the colour of the background around the colour boxes. 
  437.  
  438.      COLOUR Buttons:
  439.      There are 6 of these, GET, COPY, SWAP, CYCLE, SPREAD and SKIP.
  440.      These are selected with the left (and sometimes right) mouse button.
  441.  
  442.      COPY and SWAP are explained above.
  443.  
  444.      CYCLE. Press Left mouse button to cycle forward and right mouse 
  445.      button to cycle backwards.
  446.  
  447.      SPREAD spreads the colour from the current colour to the TO colour
  448.      and works in conjunction with the SKIP button. 
  449.  
  450.      If SKIP is 1 then the spread will skip 1 colour in between each      
  451.      one it spreads. Best way is to try it! I put this in because I 
  452.      thought it might be useful in a Mandelbrot type programme.
  453.      SKIP can be any number you like providing it is between 0 and 9.
  454.      I don't think it would be a very good idea to set it to a number   
  455.      greater than the number of colours between the two colours you are
  456.      spreading between. This could cause some unpredictable results.
  457.      Usually you will leave this set to zero.
  458.    
  459.      GET brings up a window with a number of preset colours.
  460.      You can pick any colour to be changed into one of the preset 
  461.      colours. Pick your CURRENT GET colour by clicking it with the
  462.      Left mouse button. This will not disturb your CURRENT and TO
  463.      settings although the outlines on these boxes may disappear
  464.      while the get window is open. (They will return when you close
  465.      this window.)
  466.      When you open this window the CURRENT GET colour will be set to 
  467.      colour number 2 (third from the left on the top row). If you don't
  468.      want to change this colour then select a different one.     
  469.  
  470.      The up and down arrows on the left move the list of colours up 
  471.      and down.
  472.      
  473.      P picks the colour in the middle of the box and changes your CURRENT
  474.      GET colour to this. 
  475.      
  476.      R assigns a random colour to your CURRENT GET colour.
  477.  
  478.      Cancel CURRENT returns your CURRENT GET colour to what it was
  479.      before you opened the GET window.
  480.      Cancel ALL returns all of the colours to what they were before
  481.      you opened the GET window. 
  482.  
  483.      QUIT quits the GET window.
  484.  
  485.  
  486.      SPRITE performs a Get Sprite Palette when you click it.
  487.  
  488.      DEFAULT Left mouse 
  489.      returns all colours to the programme's default colours
  490.     
  491.      DEFAULT Right mouse
  492.      selects the AMOS default palette.
  493.  
  494.      Exit CANCEL cancels all changes and returns you to your programme.
  495.      Exit ACCEPT keeps all changes and returns you to your programme.
  496.  
  497.                END OF PALETTE DOCS.
  498.       
  499. SAVE IFF and LOAD IFF: save and load an IFF screen.
  500.                 THIS DOES NOT SAVE OR LOAD THE IFS CODE NEEDED TO 
  501.                 GENERATE THE TRIANGLES! (Use load and save IFS in the
  502.                 project menu for this.)
  503.                 SAVE IS DISABLED IN THE DEM VERSION
  504.  
  505.  MONO/MULTI COLOUR. Allows image generation in a single colour
  506.                 (which is faster) or plots each transformation in a 
  507.                 different colour (which can be useful if you want to see
  508.                 what each triangle is doing)
  509.  
  510.     EXAMPLE MENU: contains 4 examples. Select them and then GENERATE.
  511.                   See the tutorial 'getting started' above.
  512.  
  513.   WARNING!
  514.   Many functions are irreversible. (eg. NEW, DELETE etc.) There are  no 
  515.   'idiot proof' boxes asking you 'are you sure' in this version.
  516.   (Something  else for V2!)
  517.  
  518.  
  519.   BUGS
  520.   ****
  521.   This code has been thoroughly tested by an expert bug finder 
  522.   (Perry Rosenboom) who has the incredible ability to run a programme
  523.   for the first time and find bugs that happen once in a blue moon!
  524.   (I never did manage to reproduce the one which turned the screen 
  525.   white, although I have made sure? that it can't happen again!)
  526.  
  527.   My code no longer contains any bugs. It may contain a few Slightly 
  528.   Undesirable Features (SUFs). If you find any SUFs in it please write
  529.   back and let me know.
  530.  
  531.   If you are running this programme from RAMOS (the AMOS runtime system)
  532.   please be aware that RAMOS needs access to your boot disk while it is
  533.   loading. Single drive owners will be asked to insert the boot disk.
  534.   Do this, but don't be surprised when not much happens!
  535.   When you have put the boot disk in and waited for the drive to stop,
  536.   replace the boot disk with the disk which has RAMOS on it. Then try and
  537.   run the programme again and it should work.
  538.   Alternatively boot from the disk with RAMOS on. This is a SUF of RAMOS,
  539.   not IFSgen!
  540.  
  541.   This does not apply to the compiled versions although it may need to access
  542.   your boot disk when it is loading. Just follow the system prompts.
  543.  
  544.   It is possible that you will produce a set of triangles for which it is
  545.   impossible to solve the set of simultaneous equations which are used to
  546.   find the IFS code. This is NOT a bug! (you are trying to do something
  547.   which is mathematically impossible!)
  548.   This would result in a divide by zero error.
  549.   I have put in a routine to trap this, but if you come up with any 
  550.   other divide by zero errors please send details.
  551.  
  552.   If you try to generate an 'impossible' ifs code (this will usually
  553.   only happen if you put all three corners of one triangle in the same
  554.   spot, or if you zoom in too far, thereby making a triangle of zero size)
  555.   then a message will appear on the screen asking you to redefine your
  556.   triangles. Press the space bar to continue. 
  557.   Unfortunately due to a minor SUF, sometimes the message will flash up
  558.   once for each triangle and you will have to keep pressing the space bar
  559.   until it goes away. It will go eventually!
  560.   When this message screen is displayed it may cause you to run out of 
  561.   memory and the programme will stop. (see 'memory requirements' above.)
  562.   So if the programme stops when you have just placed a triangle it is
  563.   almost certainly due to lack of memory. I'm working on it!
  564.  
  565.   AMOS PROGRAMMERS NOTES
  566.   **********************
  567.  
  568.   If you have registered and have the source!
  569.  
  570.   If you are trying to figure out what I have done, good luck! I had to 
  571.   restructure a large part of it and the result is a hybrid between two
  572.   control systems. I might fix it up one day, but at the moment it works
  573.   so I'm happy!
  574.   You will also notice that I'm not very good at putting in the REMs!
  575.  
  576.   There are 3 general procedures which you may find useful
  577.  
  578.   1. GUMBYPAL:
  579.          My palette procedure. Full details of this can be found in
  580.          gumbypal.doc. This has been modified slightly by the addition
  581.          of a few lines at the end to handle the dummy screen which is
  582.          used by ifsgen to assist in hiding/showing the triangles.
  583.   2. GPBUTTONS:
  584.              A procedure for drawing fancy buttons around a zone of text.
  585.              See gumbypal.doc for details.
  586.   3. SIMEQNS:
  587.            A simultaneous equation solver. This should be fairly self 
  588.            explanatory. The coefficients of the variables are fed into 
  589.            an array, SIMA# and the answers are returned in the array SIMX#
  590.            These must be made global. (If only Francois had allowed us to
  591.            pass an array as a parameter!)
  592.  
  593.   Sorry, 4 things. Amongst the procedures which you may find useful are.....
  594.  
  595.   4. STRINGGET:
  596.              This is used in the fine tune window to display and change
  597.              various strings. This has been modified a few times and is
  598.              realy due for a complete rewrite to make it a bit more logical
  599.              and capable of selecting numbers and/or letters. If anyone 
  600.              gets around to doing this before I do please send it back!
  601.              The last parameter is used to allow or disallow changes to
  602.              the displayed string.
  603.  
  604.   The above 4 routines were written in a way which made them as general as
  605.   I could possibly make them so that they could easily be used in other
  606.   programmes. 
  607.  
  608.  
  609.   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  610.       
  611.       I hope you find this programme useful and/or interesting and that you 
  612.       bother to take the time to write back. If you have written anything 
  613.       that you would like to send me, please feel free to do so.
  614.  
  615.  
  616.       BUT PLEASE DON'T SEND ANY SILLY SCROLLY DEMOS, MEGADEMOS, ULTRADEMOS,
  617.       ULTRAMEGADEMOS, MEGAULTRADEMOS, ULTRACOSMICDEMOS, ALPHAGAMMAOMEGADEMOS,
  618.       ZAPHODEFFINGBEEBLEBROXDEMOS OR ANYTHING ELSE VAGUELY RESEMBLING A DEMO!
  619.  
  620.  
  621.       AMOS IS A BRILLIANT LANGUAGE SO HOW ABOUT USING IT TO WRITE SOMETHING
  622.       REALLY USEFUL?
  623.  
  624.       Happy (real) programming.
  625.       Andrew.
  626.  
  627.  
  628.  
  629.  
  630.  
  631. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  632.  
  633.  
  634.       V2.0 docs 
  635.       *********
  636.  
  637.       Rewrote some of the code to make procedure calls more consistent and
  638.       to  remove a problem which sometimes caused a recursive procedure call
  639.       which eventually resulted in an out of memory error. (I admit that 
  640.       this just about rates as a bug! Shock!! Horror!!! Shutup Perry!)
  641.  
  642.       Added a close editor line to conserve memory when running from AMOS
  643.  
  644.       Repositioned the mouse pointer so that it didn't cover up the centre 
  645.       of the cross hairs when you are defining your triangles.
  646.     
  647.       Removed the limits to the position of the mouse so that you can put it
  648.       anywhere on your screen. NTSC users probably didn't find this a
  649.       problem but PAL users would have had trouble using the bottom of the
  650.       screen until after they had selected zoom.
  651.  
  652.       Colour palette is now saved with the ifs codes. You have the option 
  653.       of loading this or ignoring it when you load an ifs file.
  654.       V1.0 ifs files are compatible with v2.0  but v2.0 files will not load
  655.       into v1.0! So get rid of v1.0 now!
  656.     
  657.       Added idiot boxes for some functions
  658.  
  659.       Added ability to adjust single corners of triangles when using CHANGE.
  660.       To use CHANGE now, just select the triangle you want to change from 
  661.       menu, then click left mouse button near the corner you want to change.
  662.       Change other corners the same way. When you have finished just click
  663.       left mouse button somewhere not very near to one of the corners.
  664.       I have deliberately left the original triangle visible until you have
  665.       finished your adjustments. I found it more useful this way.
  666.  
  667.       Trapped errors. These are reported by their AMOS error numbers.
  668.       Out of memory and divide by zero will also generate a message.
  669.       If you have problems, please describe what you were doing and 
  670.       quote the error number.
  671.  
  672.  
  673.       NEW MENU ITEMS    
  674.       ##############
  675.  
  676.       CLOSE WORKBENCH. (in PROJECT menu)
  677.       **********************************
  678.       This saves about 40k of memory.
  679.  
  680.       PROBABILITY. (in TRANSFORMATION menu)
  681.       *************************************
  682.       You cannot use this until you have at least 3 triangles defined
  683.       (including A).      
  684.       This allows users to adjust the probability of any particular 
  685.       transformation being plotted. The higher the probability the more
  686.       likely this particular triangle will be chosen when each point is 
  687.       plotted.
  688.       To change these just click on the relevant box and retype the
  689.       correct value (just the same as the way the FINETUNE boxes work).
  690.       If you don't adjust this then the probability is proportional to the 
  691.       area of the triangle. 
  692.       
  693.       AREAS BUTTON
  694.       This returns the probabilities to their default condition which is 
  695.       proportional to the area of the triangle.
  696.  
  697.       NORMALISE BUTTON
  698.       All probabilities should add up to 1. I have provided a NORMALISE 
  699.       button which will recalculate all of your probabilities so that the 
  700.       total is 1. This is so you can enter relative weights without worrying
  701.       about the total. Eg. if you have two transformations (triangles B and
  702.       C) and you want B to be twice as likely as C then enter 2 in the space 
  703.       for B and 1 in the space for C. Then click NORMALISE and the 
  704.       programme will recalculate the probabilities giving B = 0.6667 and
  705.       C = 0.3333.
  706.       You cannot adjust the probability of triangle A because this is not
  707.       actually plotted!
  708.  
  709.       Click on QUIT when finished. The programme will automatically 
  710.       readjust the probabilities so that they add up to one if you haven't
  711.       already done so (see NORMALISE BUTTON above).
  712.  
  713.       ROTATE ANY. (in TRANSFORMATION:- MOVE menu)
  714.       *******************************************
  715.       Allows you to rotate at any angle or fraction of an angle.
  716.       Just type in the angle (in degrees) that you wish to rotate at
  717.       and press return.
  718.       Positive angles rotate clockwise, negative angles rotate anticlockwise.
  719.       (Any mathematicians who winced at the last sentence should stop and 
  720.       think! It is the crazy backwards coordinate system of this computer 
  721.       - fancy making positive y values go down! - that results in this 
  722.       apparent heresy. Stick the y axis back the right way and all is fine!) 
  723.  
  724.  
  725.       MONO/MULTI colour
  726.       *****************
  727.       You now have a choice of colour when using MONO. This might make it 
  728.       easier to combine 2 or more IFF files into the same picture.
  729.       You also have a choice of starting colours with MULTI. In each case
  730.       you will be presented with a number of colour boxes after you
  731.       select the menu item. Just click on the one you want.
  732.  
  733.     
  734.       CENTRE
  735.       ******
  736.       Made the centre tool a bit easier to use. Just drag the triangles
  737.       to wherever you want them. Sorry about the flicker but it would
  738.       use up too much memory to stop it.
  739.      
  740.  
  741.       VERSION 2.1
  742.       ***********
  743.           Compiled version. At last!
  744.           This allows non-Amos users to run it without messing about
  745.           with Ramos, and it also increases the speed of the programme.
  746.  
  747.       Further in the future. (maybe!)
  748.       *******************************
  749.      
  750.  
  751.       *   3D? If I can work out a way of displaying this so that you can see
  752.           what is going on. 3D images require 4 points to calculate each 
  753.           transformation and I am a bit worried that this will create so many
  754.           lines on the screen that you will not be able to see anything
  755.           clearly.
  756.  
  757.       *   Generate 3d code which can be used with amos 3D? I haven't seen 
  758.           Amos 3D yet so I don't know if this is feasible.
  759.  
  760.  
  761.  
  762.                 
  763.  
  764.  
  765.  
  766.                            #############################
  767.                            #                           #
  768.                            #         ADVERTS           #
  769.                            #                           #
  770.                            #############################
  771.  
  772.  
  773.         This programme is not the only thing which I have written in AMOS!
  774.  
  775.  
  776.         The following are available from the above address, providing you
  777.         send me some blank disks and/or money.
  778.  
  779.         AMASTERMIND. 
  780.         A version of mastermind written in AMOS. 
  781.         Features 4 to 8 holes to fill on each row, choice of 6 to 10
  782.         colours, sound, and an introduction screen. All controlled by
  783.         mouse, including pull down menus. This was my first AMOS 
  784.         programme. 
  785.  
  786.  
  787.         Y12RESULTS.
  788.         Written to provide a tool to analyse a set of year 12 results
  789.         from the old Victorian Higher School Certificate. This sets up
  790.         a data base of students' subjects and results and then sorts
  791.         the results to produce class lists of marks, works out averages,
  792.         numbers of A's, B's etc. and pass/fail rates. Would not be of 
  793.         much use to most people as it stands but many of the routines
  794.         could be useful for anyone thinking of writing a database/analysis
  795.         tool for some other application.
  796.  
  797.  
  798.         YOU MAY ALSO WISH TO CHECK OUT SOME OF THE GAMES WRITTEN BY
  799.         PERRY ROSENBOOM (who can also be contacted at the above address).
  800.         He has written a great game of logic and a bit of luck called
  801.         LANDMINE in which you have to negotiate a minefield.
  802.         He is also working on a submarine game in which you try to
  803.         destroy enemy ships. Funny how everything blows up in his games,
  804.         he doesn't strike me as the violent type, but this destructive
  805.         element is a bit of a worry!
  806.  
  807.  
  808.         SOME OF MY STUFF WHICH IS UNDER DEVELOPMENT OR JUST A TWINKLE IN 
  809.         AGNES' EYE.
  810.  
  811.         SCENERY GENERATOR.
  812.         A fractal scenery generator with rivers, haze-fog-clouds,
  813.         user-variable snow, tree and water levels, and maybe even different
  814.         types of rock and vegetation? 
  815.         V1.1 is now ready, you can get a (compiled) DEMO version (with saves
  816.         disabled) if you send me a blank disk and enough to cover postage, or  
  817.         free when you register for IFSgen. (let me know if you want it)
  818.         Alternatively you can buy the full version for $20.
  819.  
  820.  
  821.         SIMULTANEOUS EQUATION SOLVER
  822.         This will be based on the simultaneous equation solving procedure
  823.         used in IFSGEN, but will have an interface which allows you to
  824.         type in the equations you want solved and then prints out the
  825.         results.
  826.         
  827.